# Contributor: Luca Weiss <luca@z3ntu.xyz>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=audiotube
pkgver=23.08.4
pkgrel=0
pkgdesc="Client for YouTube Music"
url="https://invent.kde.org/plasma-mobile/audiotube"
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by purpose -> qt5-qtwebengine
arch="all !armhf !ppc64le !s390x !riscv64"
license="GPL-2.0-or-later"
depends="
	gst-plugins-bad
	gst-plugins-good
	kirigami-addons
	kirigami2
	purpose5
	py3-ytmusicapi
	qt5-qtbase-sqlite
	qt5-qtimageformats
	qt5-qtmultimedia
	yt-dlp
	"
makedepends="
	extra-cmake-modules
	futuresql-dev
	kcrash5-dev
	ki18n5-dev
	kirigami-addons-dev
	kirigami2-dev
	py3-pybind11-dev
	python3-dev
	qt5-qtsvg-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/multimedia/audiotube.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/audiotube-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
cf1adce9d2f97f732764452cbd1b65dd819dee07fbeaaaa42e6cb9d0a0ee544450993a82d049557f1a2c4d2222a817c65b04906f7e74713bfb49412c534e9894  audiotube-23.08.4.tar.xz
"
